import { defineStore } from 'pinia';
import {reactive,toRefs } from 'vue'; 
import helper from '../utils/helper.js';

const sessionStore = defineStore('session', () => {
	const state = reactive({
		token:"",//会话标记
		loadShow:true,
		date:new Date()
	});
	const closeLoadShow = function(){
		state.loadShow = false
	}
	const setToken = function(token) {
		state.token = token
	}
	const login = function() {
		
	}
	return {
		closeLoadShow,setToken,
		...toRefs(state)
	}
});
export default sessionStore;
